import request from '@/utils/request'

// 查询用户视频进度列表
export function listUserVideo(query) {
  return request({
    url: '/business/userVideo/list',
    method: 'get',
    params: query
  })
}

// 查询用户视频进度详细
export function getUserVideo(userId, platformId) {
  return request({
    url: '/business/userVideo/queryByPlatformId?userId=' + userId + '&platformId=' + platformId,
    method: 'get'
  })
}

// 新增用户视频进度
export function addUserVideo(data) {
  return request({
    url: '/business/userVideo',
    method: 'post',
    data: data
  })
}

// 修改用户视频进度
export function updateUserVideo(data) {
  return request({
    url: '/business/userVideo',
    method: 'put',
    data: data
  })
}

// 删除用户视频进度
export function delUserVideo(baseId) {
  return request({
    url: '/business/userVideo/' + baseId,
    method: 'delete'
  })
}
